import request from '@/request/request'
// 获取当前用户信息
export function getUserInfo(data) {
  return request({
		loading:true,
    url: '/h5Personal',
    method: 'get',
		data:data
  })
}

//获取雇佣列表
export function getEmploymentList(data) {
  return request({
    url: '/h5/getEmploymentList',
    method: 'get',
		data:data
  })
}

//切换雇主信息
export function changeEmployer(employerId) {
  return request({
    url: `/h5/changeEmployer/${employerId}`,
    method: 'get'
  })
}

//修改个人信息
export function updateUserInfo(data) {
  return request({
		loading:true,
    url: `/h5Personal`,
    method: 'put',
		data:data
  })
}




/*修改密码start*/
//更新密码
export function updatePwd(data) {
  return request({
		loading:true,
    url: '/h5captcha/updatePwd',
    method: 'post',
		data:data
  })
}
//密码修改——发送邮箱验证码
export function sendEmailCode(data) {
  return request({
		loading:true,
    url: '/h5captcha/sendEmailCode',
    method: 'get',
		data:data
  })
}
//密码修改——发送短信验证码
export function sendPhoneCode(data) {
  return request({
		loading:true,
    url: '/h5captcha/sendPhoneCode',
    method: 'get',
		data:data
  })
}
//密码修改——校验验证码
export function checkCode(data) {
  return request({
		loading:true,
    url: '/h5captcha/checkCode',
    method: 'post',
		data:data
  })
}
/*修改密码end*/


//查询我的工资单
export function getPayrollList(data) {
  return request({
		loading:true,
    url: '/salary/salaryCalculation/getPayrollList',
    method: 'get',
		data:data
  })
}
//工资单详情
export function getPayrollDetail(data) {
  return request({
		loading:true,
    url: '/salary/salaryCalculation/getPayrollDetail',
    method: 'get',
		data:data
  })
}